<template>
  <SetpCom
    v-if="visible"
    :update-product="editRow"
    @return-active="$emit('return-active', $event)"
    :category-tree="categoryTree"
  >
  </SetpCom>
  <!-- updateProduct -->
</template>
<script>
import { category } from "@/api";
import SetpCom from "@/components/SetpCom";
export default {
  name: "EditProduct",
  props: ["editRow", "visible"],
  data() {
    return {
      categoryTree: [],
    };
  },
  components: { SetpCom },
  methods: {},
  async created() {
    const res = await category();
    this.categoryTree = res.data.results;
  },
};
</script>
